<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="com.wed.db.ConnectDB"%>
<%@page import="com.wed.db.cmapstudent"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />

<!--[if lte IE 6]>
	<script type="text/javascript" src="supersleight-min.js"></script>
    <link href="css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colReorder.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colVis.css">

<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colReorder.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colVis.js"></script>


<script type="text/javascript" language="javascript" class="init">


$(document).ready(function() {
    var table = $('#example').DataTable( {
        dom: 'RC<"clear">lfrtip',
        columnDefs: [
            { visible: false, targets: 1 }
        ]
	} );
} );
$(document).ready(function() {
    var table = $('#example1').DataTable( {
        dom: 'RC<"clear">lfrtip',
        columnDefs: [
            { visible: false, targets: 1 }
        ]
	} );
} );

	</script>
</head>

<body>
<%int as=Integer.parseInt(request.getParameter("AssignmentId")); 
String t=request.getParameter("username"); 
ArrayList<cmapstudent> lst = new ConnectDB().getListCmapStudentCL(t,as);
ArrayList<cmapstudent> lstDaVe = new ConnectDB().getListCmapStudent(t,as);
String share = "ReceiveCmStudent.jsp?username="+t;
String view = "BTDaLam_SV.jsp?username="+t;
String btChuaLam = "BTChuaLamSV.jsp?username="+t;

%>
<div id="main"><!-- Main starts here -->
<div id="header"><!-- Header starts here -->
	<img src="images/spkt.png" alt="" />
</div><!-- Header ends here -->
<div id="navigation">
<ul>
	<li><a href="#" title=""><font color="black" size="1">Xin Chào Sinh Viên:</font></a></li>
	<li><a href="#" title=""><%=t%></a></li>
</ul>
</div>
<div id="contentHolder"><!-- Content Holder starts here -->
<div id="content"><!-- Content starts here -->
<div id="back">


<div class="clear"></div>

<div id="leftpart">
	<div class="container">
     <h1>Menu</h1>
    <ul>
    	<li><a href="<%=btChuaLam %>">Xem Bài Tập Được Giao</a></li>
       
        <li><a href="<%=view%>">Xem Bài Tập Đã Làm</a></li>
        <li><a href="<%=share%>">Bài Tập Được Share</a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
    </ul>
    <div class="button"><input type="button" value="learn more" class="learnmore" /></div>
    </div>
</div>

<div id="middlepart">
<form action="InsertVersionServlet" name="a" method="post">
		<table  width="399"  align="center" cellpadding="15"
			cellspacing="15" bgcolor="#FFFFCC">
			<tr>
				<th colspan="2" scope="col">Nhập Thông Tin Version</th>
			</tr>
			
			
			<tr>
				<td width="131"></td>
				
			</tr>
			<tr>
				<td width="131">UserName</td>
				<td width="225"><label for="Description"></label>
					<input
					type="text" name="username" id="Username" value="<%=t %>"
					readonly="readonly"/></td>
			</tr>
			<tr>
				<td width="131">AssignmentID</td>
				<td width="225"><label for="Description"></label>
					<input
					type="text" name="AssignmentId" id="Lecture" value="<%=as %>"
					readonly="readonly"/></td>
			</tr>
			<tr>
				<td width="131">Date</td>
				<td width="225"><label for="DeadLine"></label> 
				
		<input id=datepick size="50"name="submitdate" />
		
		<hr />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/datepickr.min.js"></script>
		<script type="text/javascript">
			new datepickr('datepick');	
			new datepickr('datepick1');	
		</script>
				</td>

			</tr>
			<tr>
				<td width="131"></td>
				<td width="225"><input type="submit" value="Lưu" onClick="contentDisp();"
		style="color: blue; height: 36px; width: 94px">	</td>
			</tr>
			
			
		</table>
		</form>
		<form action="">
		<h1>Version Chưa Vẽ</h1>
	<table id="example" class="display" cellspacing="0" width="100%">

				<thead>
					<tr background="#800517">

						<td width="10%" height="26" bgcolor="#CC6600">CmapVersion</td>
						<td width="10%" bgcolor="#CC6600">SubmitDay</td>
						<td width="5%" bgcolor="#CC6600">Score</td>
						<td width="10%" bgcolor="#CC6600">UserName Student</td>
						<td width="10%" bgcolor="#CC6600">Id Assignment</td>

						<td width="10%" bgcolor="#CC6600"></td>
						
					</tr>
				</thead>
				<tbody>
					<%
				 for(cmapstudent cm : lst){
					 String detailURL = "VeConcept.jsp?idVersion="+cm.getCmapversion()+"&username="+t+"&AssignmentId="+as;
					
				 
				%>
					<tr>

						<td><%=cm.getCmapversion() %></td>
						<td><%=cm.getDatesubmit() %></td>
						<td><%=cm.getScore() %></td>
						<td><%=cm.getUsernamestudent() %></td>
						<td><%=cm.getIdAss() %></td>

						<td><a href="<%=detailURL%>">Vẽ </a></td>
				

					</tr>
					<%} %>

				</tbody>
			</table>  
		<h1>Version Đã Vẽ</h1>
	<table id="example1" class="display" cellspacing="0" width="100%">

				<thead>
					<tr background="#800517">

						<td width="10%" height="26" bgcolor="#CC6600">CmapVersion</td>
						<td width="10%" bgcolor="#CC6600">SubmitDay</td>
						<td width="5%" bgcolor="#CC6600">Score</td>
						<td width="10%" bgcolor="#CC6600">UserName Student</td>
						<td width="10%" bgcolor="#CC6600">Id Assignment</td>

							
						<td width="10%" bgcolor="#CC6600"></td>
					</tr>
				</thead>
				<tbody>
					<%
				 for(cmapstudent cm : lstDaVe){
					
					 String xem = "SubmitCmap.jsp?idVersion="+cm.getCmapversion()+"&AssignmentId="+as+"&username="+t;
				 
				%>
					<tr>

						<td><%=cm.getCmapversion() %></td>
						<td><%=cm.getDatesubmit() %></td>
						<td><%=cm.getScore() %></td>
						<td><%=cm.getUsernamestudent() %></td>
						<td><%=cm.getIdAss() %></td>

						
					
					<td><a href="<%=xem%>">Nộp Bài </a></td>

					</tr>
					<%} %>

				</tbody>
			</table>  
		</form>
</div>
<div class="clear"></div>
<!--<div class="bottomImg"><img src="images/bottomBg.png" alt="" /></div>-->
</div>
</div><!-- Content ends here -->
</div><!-- Content Holder ends here -->
<div class="bottomImg"><img src="images/02.png" alt="" /></div>



<div id="footer"><!-- Footer starts here -->
<div lang="copy">Copyright 2010 Your Company Name</div>
<div class="design"><a href="http://studio7designs.com/portfolio/">Designed by STUDIO7DESIGNS</a></div>
<div class="clear"></div>
</div><!-- Footer ends here -->
</div><!-- Main ends here -->
</body>
</html>
